﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DBCodeGenerator
{
    public partial class frmselector : Form
    {
        public frmselector()
        {
            InitializeComponent();
            GlobalSettings.SelectedDatabaseType = dbtype.NONE;
        }

        private void btncnt_Click(object sender, EventArgs e)
        {
            if (cmbdbtypelst.Text == "Microsoft SQL Server 2008 R2")
            {
                this.Hide();
                GlobalSettings.SelectedDatabaseType = dbtype.MSSQL_SERVER_2008R2;
                frmmssqllogin mslogin = new frmmssqllogin();
                mslogin.ShowDialog();
            }
            else if (cmbdbtypelst.Text == "My SQL Server")
            {
                this.Hide();
                GlobalSettings.SelectedDatabaseType = dbtype.MYSQL_SERVER;
                frmmysqlLogin mysqllogin = new frmmysqlLogin();
                mysqllogin.ShowDialog();
            }
            


            this.Close();
        }
    }
}
